<%--
  Created by IntelliJ IDEA.
  User: 28101
  Date: 2021/9/22
  Time: 19:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link href="/css/bootstrap-theme.css" rel="stylesheet">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <script src="../js/jquery-3.3.1.min.js"></script>
    <title>updateCommodity</title>
    <style>
        .myDiv{
            margin-top: 50px;
        }

        .myDivCol{
            margin-top: 10px;
        }

        .mySub{
            background-color: #007bff;
            margin-left: 20px;
            width: 100px;
        }

        form{
            font-size: 20px;
        }
    </style>
</head>
<body>

    <div class="container myDiv table-bordered">
        <form action="/CommodityServlet?method=updateCommodity" method="post">
            <div class="form-group col-md-12 myDivCol">
                <input type="text" name="pid" value=${commodity.pid} readonly="readonly" hidden="hidden">
            </div>
            <div class="form-group col-md-6 myDivCol">
                商品名称: <input class="form-control" placeholder="商品名称" type="text" name="commodityName" value=${commodity.commodityName} >
            </div>
            <div class="form-group col-md-12 myDivCol">
<%--                说明: <input class="form-control" placeholder="说明" type="text" name="describetest" value=${commodity.describetest} >--%>
                说明:<textarea class="form-control" placeholder="说明" type="text" name="describetest" >${commodity.describetest}</textarea>
            </div>
            <div class="form-group col-md-12 myDivCol">
                <input class="mySub" type="submit" value="确认">
                <input id="btnToSelect" class="mySub" type="button" value="返回">
            </div>
        </form>
    </div>

    <script src="/js/bootstrap.min.js"></script>
    <script>

        $("#btnToSelect").click(function () {
            if (confirm("确定要返回吗？")){
                window.location.href = "/CommodityManagerServlet?method=getCommodityByPage&type=1";
            }
        });

    </script>

</body>
</html>
